﻿CREATE TABLE [dbo].[Usuarios] (
    [IdUsuario]     INT           IDENTITY (1, 1) NOT NULL,
    [IdPerfil]      INT           NOT NULL,
    [Nombre]        VARCHAR (50)  NOT NULL,
    [Clave]         VARCHAR (20)  NOT NULL,
    [Observaciones] VARCHAR (500) NOT NULL,
    [EstaEliminado] BIT           CONSTRAINT [DF_Usuarios_EstaEliminado] DEFAULT ((0)) NOT NULL,
    CONSTRAINT [PK_Usuarios] PRIMARY KEY CLUSTERED ([IdUsuario] ASC),
    CONSTRAINT [FK_Usuarios_Perfiles] FOREIGN KEY ([IdPerfil]) REFERENCES [dbo].[Perfiles] ([IdPerfil]),
    CONSTRAINT [UQ_Nombre] UNIQUE NONCLUSTERED ([Nombre] ASC)
);





